// @ts-nocheck
import request from '@/utils/request'

// 接口1 : 获取全部所有的频道
export const getAllChannels = () => {
  return request({
    url: '/v1_0/channels',
  })
}

// 接口2 : 添加频道
export const addUserChannel = channel => {
  return request({
    method: 'patch',
    url: '/v1_0/user/channels',
    data: {
      channels: [channel],
    },
  })
}

// 接口3 : 删除频道
export const deleteUserChannel = target => {
  return request({
    method: 'DELETE',
    url: `/v1_0/user/channels/${target}`,
  })
}
